using UnityEngine;

namespace PKGames.AssetBundleSystem
{
	public abstract class AssetBundleLoader
	{
		protected string _assetBundleName = string.Empty;

		protected AssetBundle _assetBundle;

		public abstract void Start();

		public abstract bool IsDone();

		public abstract float GetProgress();

		public abstract string GetError();

		public abstract AssetBundle GetAssetBundle();

		protected void AddAssetBundleToCache(string assetBundleName, AssetBundle assetBundle)
		{
			if (assetBundle != null)
			{
				AssetBundleCache.CacheAssetBundle(assetBundleName, assetBundle);
			}
		}

		public abstract void Cleanup();
	}
}
